class ArrayIntegerStack implements IntegerStack{
    private int capacity;
    private int top=0;
    private Integer[] arrStack;
    public Integer push(Integer item)throws  FullStackException{
    	if(item==null) 
    		return null;
    	if(top==arrStack.length){
    		throw new FullStackException();
    	}
    	arrStack[top]=item;
    	top++;
    	return item;
    }
    public Integer pop()throws EmptyStackException {
    	if(top==0)
    		throw new EmptyStackException();
    	top--;
    	return arrStack[top];
    }
    public Integer peek() throws EmptyStackException{
    	int top1=top-1;
    	if(top==0)
    		throw new EmptyStackException();
    	return arrStack[top1];
    }

				
}